package c.francis.service;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import c.francis.mapper.MemberMapper;
import c.francis.pojo.Member;
import c.francis.service.impl.MemberServiceImpl;
@Service
public class MemberService implements MemberServiceImpl {
	@Autowired
	private MemberMapper memberMapper;
	
	public Member queryMember(String email) {
		return memberMapper.queryMemberByEmail(email);
	}
	public void insertNewMembers(String username,String email,String password,Date regtime) {
		memberMapper.insertNewMember(username,email, password,  regtime);
	}
	public void updateLinkInfo(int id,String name ,String phone) {
		memberMapper.updateLink(id, name, phone);
	}
	public void udpatePwd(int id,String newpassword) {
		memberMapper.updatePwd(id, newpassword);
	}
	public List<Member> queryAllMember(int pagestart){
		return memberMapper.queryAllMember(pagestart);
	}
	public int countpage() {
		return memberMapper.countPage();
	}
	public int updateTicketByEmail(String	email,String	ticket){
		return memberMapper.updateTicketByEmail(email,ticket);
	}

	@Override
	public Member findMemberByTicket(String ticket) {
		return memberMapper.findMemberByTicket(ticket);
	}


}
